Warning: mkdir(): No space left on device in /var/www/tg-me/post.php on line 37

Warning: file_put_contents(aCache/aDaily/post/vuejs_ru/--): Failed to open stream: No such file or directory in /var/www/tg-me/post.php on line 50
Александр www in Vue.js — русскоговорящее сообщество | Telegram Webview: vuejs_ru/1610778 -
Telegram Group & Telegram Channel
Всем привет, подскажите как 2 роутера использовать во Vue:

import router from './routes';
import adminRouter from './admin/routes';

createApp(App)
.use(router)
.use(adminRouter);


admin/router/index.js:
import { createRouter, createWebHistory } from 'vue-router';
import AdminLayout from "../layouts/AdminLayout.vue";
import Orders from '../pages/Orders.vue';

const routes = [
{ path: '/', component: AdminLayout, children: [
{ path: '/orders', name: 'AdminOrders', component: Orders, meta: {title: 'Заявки'} },
]
},
];

const adminRouter = createRouter({
history: createWebHistory('/admin'),
routes,
});

export default adminRouter;


routes/index.js:
import { createRouter, createWebHistory } from 'vue-router';
import AppLayout from "../layouts/AppLayout.vue";
import Main from '../pages/Main.vue';

const routes = [
{ path: '/', component: AppLayout, children: [
{ path: '/', name: 'Main', component: Main, meta: {title: 'Главная'} },
]
},
];

export default router;


Так вообще можно делать?? В консоли всякие ошибки



tg-me.com/vuejs_ru/1610778
Create:
Last Update:

Всем привет, подскажите как 2 роутера использовать во Vue:

import router from './routes';
import adminRouter from './admin/routes';

createApp(App)
.use(router)
.use(adminRouter);


admin/router/index.js:
import { createRouter, createWebHistory } from 'vue-router';
import AdminLayout from "../layouts/AdminLayout.vue";
import Orders from '../pages/Orders.vue';

const routes = [
{ path: '/', component: AdminLayout, children: [
{ path: '/orders', name: 'AdminOrders', component: Orders, meta: {title: 'Заявки'} },
]
},
];

const adminRouter = createRouter({
history: createWebHistory('/admin'),
routes,
});

export default adminRouter;


routes/index.js:
import { createRouter, createWebHistory } from 'vue-router';
import AppLayout from "../layouts/AppLayout.vue";
import Main from '../pages/Main.vue';

const routes = [
{ path: '/', component: AppLayout, children: [
{ path: '/', name: 'Main', component: Main, meta: {title: 'Главная'} },
]
},
];

export default router;


Так вообще можно делать?? В консоли всякие ошибки

BY Александр www in Vue.js — русскоговорящее сообщество


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/vuejs_ru/1610778

View MORE
Open in Telegram


Vue js — русскоговорящее сообщество Telegram | DID YOU KNOW?

Date: |

Tata Power whose core business is to generate, transmit and distribute electricity has made no money to investors in the last one decade. That is a big blunder considering it is one of the largest power generation companies in the country. One of the reasons is the company's huge debt levels which stood at ₹43,559 crore at the end of March 2021 compared to the company’s market capitalisation of ₹44,447 crore.

The STAR Market, as is implied by the name, is heavily geared toward smaller innovative tech companies, in particular those engaged in strategically important fields, such as biopharmaceuticals, 5G technology, semiconductors, and new energy. The STAR Market currently has 340 listed securities. The STAR Market is seen as important for China’s high-tech and emerging industries, providing a space for smaller companies to raise capital in China. This is especially significant for technology companies that may be viewed with suspicion on overseas stock exchanges.

Vue js — русскоговорящее сообщество from no


Telegram Александр www in Vue.js — русскоговорящее сообщество
FROM USA